/*
 * Criado em Mar 21, 2005
 *
 *
 */
package vendas.dto;

import gminet.infra.dao.SimpleTransferObject;

import java.util.List;

/**
 * @author Gabriel Flores Mendes
 * 
 * 
 */
public class UserStatus extends SimpleTransferObject {

    private static final long serialVersionUID = 7150997831782136762L;

    private static final byte PENDENT_ID = 10;
    private static final byte ENABLED_ID = 20;
    private static final byte DESABLED_ID = 90;

    public static final UserStatus PENDENT = new UserStatus(PENDENT_ID, "Cadastro pendente");
    public static final UserStatus ENABLED = new UserStatus(ENABLED_ID, "Ativo");
    public static final UserStatus DESABLED = new UserStatus(DESABLED_ID, "Inativo");

    static {
        Class<UserStatus> clazz = UserStatus.class;
        addObject(clazz, PENDENT);
        addObject(clazz, ENABLED);
        addObject(clazz, DESABLED);
    }

    private UserStatus(int i, String str) {

        super(i, str);
    }

    @SuppressWarnings("unchecked")
    public static List<UserStatus> getList() {

        return (List<UserStatus>) getList(UserStatus.class);
    }

    public static UserStatus getUserStatusById(int id) {

        return (UserStatus) getObject(UserStatus.class, id);
    }

}
